$(function () {
    var uiContent = $('#uiContent');
    $.wxJsApiConfig(function () {
        main();
    });

    function main() {
        var code = $.getUrlParam('code');
        if (!code) {
            $.gotoErrorPage(uiContent);
            return;
        }

        showUI(code);
    }

    function showUI(code) {
        $('#prizeCode').html(code);
        uiContent.show();
    }
});